package com.reactim.user.repository;

import com.reactim.user.entity.UserPrivacySetting;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * 用户隐私设置Repository
 */
@Repository
public interface UserPrivacySettingRepository extends JpaRepository<UserPrivacySetting, Long> {
    
    /**
     * 根据用户ID查找隐私设置
     */
    Optional<UserPrivacySetting> findByUserId(Long userId);
    
    /**
     * 检查用户是否存在隐私设置
     */
    boolean existsByUserId(Long userId);
    
    /**
     * 删除用户的隐私设置
     */
    void deleteByUserId(Long userId);
}